import { useState } from "react"
// 函数组件
function Hello(props) {
  // console.log(props);
  return (
    <>
      <h3>我是子组件---{props.value}</h3>
    </>
  )
}
function App() {
  const [value, setValue] = useState(100)
  return (
    <>
    <Hello name="鲁班" value={value} />
    <button onClick={() => setValue(value+1)}>父组件修改value</button>
  </>
)
}
export default App